<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    /* calc() */
    :root {
      --width: 100px
    }

    div {
      width: calc(var(--width)*2);
      /* width: calc(calc(100% - 20px)/2); */
      height: 200px;
      background-color: pink;
    }

    /* max(a,b) min(a,b)*/
  </style>
</head>

<body>
  <!--测试css函数 -->
  <div></div>
</body>

</html>